<?php

/**
 * JingYao-backend
 *
 * @link     https://gitee.com/wang-zhihui-release/jingyao-backend
 * @apiDocument https://gitee.com/wang-zhihui-release/jingyao-backend/wikis/
 */

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSearchNoticesTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('search_notices', function (Blueprint $table) {
            $table->id();
            $table->string('title');
            $table->integer('user_id');
            $table->text('images');
            $table->tinyInteger('type')->default(0)->comment('1: 寻物 2:寻人');
            $table->tinyInteger('status')->default(1)->comment('1: 寻找中, 2: 已找到');
            $table->text('content');
            $table->integer('push_time');
            $table->tinyInteger('check_status')->default(0);
            $table->string('check_message')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('search_notices');
    }
}
